<!--公共开始-->
<include file="./public" />
<!--公共结束-->
<title>7min理财</title>
</head>

<body>
<!--头部+顶部开始-->
<include file="./top" />
<!--头部+顶部结束-->

<!--主体开始-->
<div class="main-content">
	<div class="panel">
    	<div class="panel-head">发布爆料</div>
    	
    	<form action='__SELF__' method='POST'>
        <div class="panel-body grapWritten">
        	<p>
            	<label>爆料主题：</label>
                <input class="form-control" type="text" id="title" name="title"/>
                <span class="r fr" id="txtLen">还能输入&nbsp;<b>80</b>&nbsp;个字</span>  
    			<span id="cl hide"></span>
                <span class="notice_wrong" style="display:none"><i class="fa fa-times-circle"></i>错误提示错误提示</span>
            </p>
            <p>
            	<label>爆料内容：</label>
                <textarea name="content" cols="" rows=""></textarea>
                <!--此处用编辑器替换-->
                <span class="notice_wrong" style="display:none"><i class="fa fa-times-circle"></i>错误提示错误提示</span>
            </p>
            <p>
            	<label>&nbsp;</label>
                <input class="btn btn-danger" value="发 布" type="submit">
                <input class="btn btn-success" value="清 空" type="reset">
            </p>
        </div>
        </form>
        
        
        <script type="text/javascript">  
			$(function(){  
				$("#title").bind({  
					 "keyup": function (e) {  
						 $("#cl").empty();  
						 $("#cl").append(smartLen($(this).val()));  
						 checkWords($(this).val());  
					 }  
				});  
			});  
			var urlReg ={  
				"urlRegText":"((news|telnet|nttp|file|http|ftp|https)://){1}(([-A-Za-z0-9]+(\\.[-A-Za-z0-9]+)*(\\.[-A-Za-z]{2,5}))|([0-9]{1,3}(\\.[0-9]{1,3}){3}))(:[0-9]*)?(/[-A-Za-z0-9_\\$\\.\\+\\!\\*\\(\\),;:@&=\\?/~\\#\\%]*)*"  
			};  
			// 字符串长度  
			function smartLen(str) {  
				str = str.replace(/(^[\s\n]+)|([\s\n]+$)/,"").replace(/[\s\n]+/g," ");  
				str = str.replace(new RegExp(urlReg.urlRegText, "gi"), new Array(12).join("aa"));  
				return Math.ceil(($.trim(str.replace(/[^\u0000-\u00ff]/g, "aa")).length) / 2);  
			}  
			function checkWords(content){  
				var len = 80-smartLen(content);  
				  if (len < 0) {  
					$('#txtLen').html('超出&nbsp;<b style="color:#E56C0A">' + (-len) + '</b>&nbsp;字');  
					$("#subbtn").attr("disabled",true);  
				} else {  
					$('#txtLen').html('还能输入&nbsp;<b>' + len + '</b>&nbsp;个字');     
				$("#subbtn").attr("disabled",false);          
				}  
			}  
			</script>
    </div>
    <div class="clear"></div>
</div>
<!--主体结束-->

<!--底部开始-->
<include file="./foot" />
<!--底部结束-->
</body>
</html>
